//
//  TL_GoogleManager.h
//  WXReader
//
//  Created by LL on 2020/9/6.
//  Copyright © 2020 Andrew. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <GoogleSignIn/GoogleSignIn.h>

#import "TL_UserInfoModel.h"

@class TL_GoogleManager;

typedef NS_ENUM(NSUInteger, TL_GoogleState) {
    TL_GoogleStateLogin,
    TL_GoogleStateBinding
};

NS_ASSUME_NONNULL_BEGIN

@protocol TL_GoogleManagerDelegate <NSObject>

@optional

// 登录成功
- (void)googleLoginSuccess:(TL_GoogleManager *)manager userInfo:(TL_UserInfoModel *)userInfo;

// 登录失败
- (void)googleLoginFail:(TL_GoogleManager *)manager error:(NSString *)error;

@end

@interface TL_GoogleManager : NSObject

@property (nonatomic, weak) id<TL_GoogleManagerDelegate> delegate;

SINGLETON_INTERFACE

- (void)tunedUpGoogleWithState:(TL_GoogleState)state;

@end

NS_ASSUME_NONNULL_END
